<template>
  <div class="classify">
    <div class="wrapper">
      <input type="text" placeholder="秒杀好礼" @click="tap" />
      <i class="iconfont icon-sousuo" id="init" ref="icon"></i>
      <div class="cancel" ref="cancel" v-tap="{methods:close}">取消</div>
    </div>
    <van-sidebar v-model="activeKey" class="wrap">
      <van-sidebar-item :to="'/Classcontent?id=1'" title="沙发·椅凳" />
      <van-sidebar-item :to="'/Classcontent?id=2'" title="床·床具" />
      <van-sidebar-item :to="'/Classcontent?id=3'" title="桌几" />
      <van-sidebar-item :to="'/Classcontent?id=4'" title="灯具" />
      <van-sidebar-item :to="'/Classcontent?id=5'" title="餐具" />
      <van-sidebar-item :to="'/Classcontent?id=6'" title="装饰·收纳" />
      <van-sidebar-item :to="'/Classcontent?id=7'" title="家纺·床品" />
    </van-sidebar>

    <router-view></router-view>
  </div>
</template>

<script>
export default {
  name: "classify",
  data() {
    return {
      activeKey: 0
    };
  },
  methods: {
    tap() {
      this.$router.push("/search");
    },
    close() {
      this.$refs.cancel.style.display = "none";
      this.$refs.icon.setAttribute("id", "init");
      this.show = false;
      this.$router.go(-1);
    }
  }
};
</script>

<style scoped>
.van-ellipsis {
  font-size: 30px;
}
.wrap {
  margin-left: 10px;
  float: left;
}
.wrap a {
  background-color: #fff;
  margin: 70px 0;
  padding: 0 5px;
}
.van-sidebar-item--select {
  border-color: #000;
}
.wrapper {
  height: 75px;
  border-bottom: solid 1px #000;
  line-height: 75px;
  position: relative;
}
.wrapper input {
  height: 50px;
  width: 85%;
  border: 0;
  margin-left: 20px;
}
.wrapper #init {
  font-size: 36px;
  line-height: 75px;
  float: right;
  margin-right: 20px;
}
.wrapper #change {
  font-size: 28px;
  line-height: 75px;
  float: left;
  margin-left: 10px;
  font-weight: bold;
  color: #615f5f;
}
.wrapper .cancel {
  font-size: 24px;
  position: absolute;
  right: 20px;
  top: 3px;
  display: none;
}
</style>